<%@page contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true" pageEncoding="UTF-8" %>
<html>
<head>
    <%@include file="/WEB-INF/include/include.jsp" %>
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <form class="layui-form layui-card-header layuiadmin-card-header-auto" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <shiro:hasPermission name="corp:query">
                        <div class="layui-inline">
                            <input type="text" name="name" value="${query.name}" placeholder="请输入企业名称" autocomplete="off" class="layui-input">
                        </div>
                        <button class="layui-btn layui-btn-normal" lay-submit="search">
                            <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                        </button>
                        <button class="layui-btn layui-btn-normal go-btn" data-url="${pageContext.request.contextPath}/system/corp/list">
                            <i class="layui-icon layui-icon-refresh layuiadmin-button-btn"></i>
                        </button>
                    </shiro:hasPermission>
                </div>
            </div>
        </form>
        <div class="layui-card-body">
            <div class="layui-inline">
                <div style="padding-bottom: 10px;">
                    <shiro:hasPermission name="corp:add">
                        <button class="layui-btn layui-btn-small layui-btn-normal go-btn" data-url="${pageContext.request.contextPath}/system/corp/add">
                            <i class="layui-icon">&#xe654;</i>
                        </button>
                    </shiro:hasPermission>
                </div>
            </div>
            <div class="layui-form" id="table-list">
                <table class="layui-table" lay-even>
                    <colgroup>
                        <col width="5%">
                        <col width="25%">
                        <col width="25%">
                        <col width="15%">
                        <col width="15%">
                        <col width="15%">
                    </colgroup>
                    <thead>
                    <tr>
                        <th><input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose"></th>
                        <th>企业名称</th>
                        <th>企业登陆名称</th>
                        <th>用户数</th>
                        <th>网盘空间(MB)</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <c:forEach var="model" items="${page.list}">
                        <tr>
                            <td><input type="checkbox" name="" lay-skin="primary" data-id="${model.id}"></td>
                            <td>${model.corpName}</td>
                            <td>${model.loginCorpName}</td>
                            <td>${model.useNum}</td>
                            <td>${model.skyDriveSpace}</td>
                            <td>
                                <div class="layui-inline">
                                    <shiro:hasPermission name="corp:edit">
                                        <button class="layui-btn layui-btn-xs layui-btn-normal go-btn hidden-xs" data-id="${model.id}"
                                                data-url="${pageContext.request.contextPath}/system/corp/edit/${model.id}"><i class="layui-icon">&#xe642;</i>
                                        </button>
                                    </shiro:hasPermission>
                                    <shiro:hasPermission name="corp:del">
                                        <button class="layui-btn layui-btn-xs layui-btn-danger del-btn" data-id="${model.id}"
                                                data-url="${pageContext.request.contextPath}/system/corp/delete/${model.id}"><i class="layui-icon">&#xe640;</i>
                                        </button>
                                    </shiro:hasPermission>
                                </div>
                            </td>
                        </tr>
                    </c:forEach>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <%@include file="/WEB-INF/include/page.jsp" %>
</div>
</body>
</html>